import request from "@/utils/request";

// 上传视频
export function uploadVideo(data) {
    return request({
        url: '/video/uploadVideo',
        method: 'post',
        data: data
    })
}

// 获取视频列表
export function getVideoList(searchType) {
    return request({
        url: `/video/getVideoList?searchType=${searchType}`,
        method: 'get'
    })
}

// 点击视频 增加播放量
export function clickVideo(id) {
    return request({
        url: `/video/clickVideo?videoId=${id}`,
        method: 'put'
    })
}

// 获取当前视频的推荐视频
export function getRecommendVideo(id) {
    return request({
      url :`/video/getRecommendVideo?videoId=${id}`,
      method: 'get'
    })
}